<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<section th:class="|tab-pane fade ${result.data.news==null?null:'show active'}|" id="modify" role="tabpanel" >
    <form th:action="@{/admin/news/save}"
          method="post"
          enctype="multipart/form-data"
          th:object="${result.data}">

        <div class="d-none">
            <label for="newsId">Id</label>
            <input id="newsId" type="text" th:value="*{news!=null?news.newsId:null}">
        </div>

        <div class="form-group">
            <label for="addNewsTitle">标题</label>
            <input th:value="*{news!=null?news.newsTitle:null}"
                   id="addNewsTitle"
                   class="form-control"
                   name="newsTitle"
                   type="text"
                   placeholder="请输入姓名..."/>
        </div>

        <div class="form-group">
            <label for="addNewsAuthor">作者</label>
            <input th:value="*{news!=null?news.newsAuthor:null}"
                   id="addNewsAuthor"
                   class="form-control"
                   name="newsAuthor"
                   type="text" placeholder="请输入Author..."/>
        </div>

        <label for="addNewsCover"> 请选择图片</label>
        <div class="input-group mb-3">
            <div class="custom-file">
                <input th:value="*{news!=null?news.newsCover:null}"
                       type="file" class="custom-file-input" id="addNewsCover" name="newsCover">
                <label class="custom-file-label" for="addNewsCover">Choose file</label>
            </div>
        </div>

        <div class="form-group">
            <label for="addNewsIntroduce">介绍</label>
            <textarea th:text="*{news!=null?news.newsIntroduce:null}"
                      id="addNewsIntroduce" class="form-control"
                      name="newsIntroduce" type="text" placeholder="请输入介绍..."></textarea>
        </div>

        <div class="form-group">
            <label for="addNewsContent">内容</label>
            <input th:value="*{news!=null?news.newsContent:null}"
                   id="addNewsContent" class="form-control"
                   name="newsContent" type="text" placeholder="请输入专业...">
        </div>

        <button type="submit" class="mb-5 btn btn-outline-success">保存</button>

    </form>
</section>
</html>